package com.life.ai.server.modules.develop.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 基础表结构
 * </p>
 *
 * @author kyle
 * @since 2025-01-06
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_job")
@ApiModel(value = "SysJob对象", description = "基础表结构")
public class SysJob implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("任务ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("任务名称")
    @TableField("job_name")
    private String jobName;

    @ApiModelProperty("任务分组")
    @TableField("job_group")
    private String jobGroup;

    @ApiModelProperty("执行方法")
    @TableField("invoke_target")
    private String invokeTarget;

    @ApiModelProperty("任务名称")
    @TableField("cron_expression")
    private String cronExpression;

    @ApiModelProperty("状态  0正常 1暂停")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("排序码")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("删除标志（0正常 1删除）")
    @TableField("is_deleted")
    @TableLogic
    private Boolean isDeleted;

    @ApiModelProperty("创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Long createBy;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改人")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @ApiModelProperty("修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
